package cn.ronghui.project.types.enums;

import lombok.Getter;

@Getter
public enum AllocationStatusEnumVO {
    ASSIGNED("assigned","已分配"),
    CHECKOUT("checkout","已退房"),
    ;

    private String code;
    private String info;

    AllocationStatusEnumVO(String code,String info) {
        this.code = code;
        this.info = info;
    }

    public static AllocationStatusEnumVO getAllocationStatusEnum(String value) {
        switch (value){
            case "已分配":
                return AllocationStatusEnumVO.ASSIGNED;
            case "未分配":
                return AllocationStatusEnumVO.CHECKOUT;
            default:
                throw new RuntimeException("参数错误");

        }
    }
}
